import { axiosGet } from "@/libs/http";
import { AxiosResponse } from "axios";

function getData(consName: string, type: string) {
  return new Promise((resolve, reject) => {
    axiosGet({
      url: `/api/constellation/getAll?consName=${consName}&type=${type}`,
      success(data: Promise<string>) {
        resolve(data);
      },
      error(err: Promise<string>) {
        reject(err);
      },
    });
  });
}

export {
  getData
}
